<?php

use yii\db\Migration;

/**
 * Class m190319_093438_add_fk_job_id_on_order
 */
class m190319_093438_add_fk_job_id_on_order extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addForeignKey('fk_jid_order_id_job', 'order', 'job_id', 'job', 'id');
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        echo "m190319_093438_add_fk_job_id_on_order cannot be reverted.\n";
        $this->dropForeignKey('fk_jid_order_id_job', 'order');

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m190319_093438_add_fk_job_id_on_order cannot be reverted.\n";

        return false;
    }
    */
}
